-
Notifications
You must be signed in to change notification settings - Fork 4
[Plugin] Add VCR Record & Replay plugins #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job! i like the clean separation of concerns and how things are structured. the vcr header is also a good idea to help debugging.
i have some small questions, and some suggestions for documentation or simplifying things a bit more.
i updated the boilerplate from https://github.com/php-http/boilerplate/ to have consistent settings. can you please rebase on master? there might be some conflicts in boilerplate files, notably .travis.yml
Great job! |
private function configureOptions(OptionsResolver $resolver): void | ||
{ | ||
$resolver->setDefaults([ | ||
'hash_headers' => [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was wondering if we should add defaults here (COOKIE, AUTHORIZATION, ACCEPT, ACCEPT-ENCODING, ACCEPT-LANGUAGE) but i guess most of the time you don't care, and when you do you should explicitly configure the headers you need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think configuration it's up to the user too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot!
can you please do a pull request against https://github.com/php-http/documentation/ and maybe one for optional integration in the HttplugBundle? i'll wait a bit with tagging 1.0 so that we can still adjust if something pops up during documenting or when using it in the bundle. |
Sure! I'll work on both :) |
Hi everyone. Is it correct that require of main lib is "php": "^5.4 || ^7.0" (and some plugins too) but here is "php": "^7.1"? And the same thing with "symfony/filesystem" and "symfony/options-resolver", I guess the versions is too high and not suitable for using with 2.* versions. Any ideas? Thx :) |
yeah, this plugin requires a more recent version of php. we are currently working on cleaning up requirements of the bundle to recent php too: php-http/HttplugBundle#336 this plugin won't work with symfony 2. |
I see and I understand that all new stuff is cool but some people do not have 100% ability (upgrade) to use 7.1 right now in seconds... Maybe you leave some branch or tags version with old versions? Chirs. |
What's in this PR?
Add a VCR like plugin to allow storing and replaying response
Why?
Allow user to do functional tests why production-like data and provide same functionality as CsaGuzzleBundle
Example Usage
Checklist
To Do